Leveraging GTFS data to assess transit supply

James Reynolds

2024-01-18

Introduction

“If you can’t measure it, you can’t manage it” is often miss-attributed to Deming (1993Deming, W Edwards. 1993. “The New Economics for Industry, Government, Education.” MIT Press.), who was actually trying to make the opposite point (Berenson 2016Berenson, Robert A. 2016. “If You Can’t Measure Performance, Can You Improve It?” JAMA 315 (7): 645–46.). Regardless, service level indicators are an important part of researching, managing and seeking to improve transit operations (Fielding 1987Fielding, Gordon J. 1987. Managing public transit strategically: a comprehensive approach to strengthening service and monitoring performance. 1st ed. Jossey-Bass Public Administration Series. San Francisco: Jossey-Bass Publishers.; Ryus et al. 2003Ryus, Paul, M Connor, S Corbett, A Rodenstein, L Wargelin, L Ferreira, Y Nakanishi, and K Blume. 2003. “TCRP Report 88: A Guidebook for Developing a Transit Performance-Measurement System.” Transit Cooperative Research Program.). A wide range of indicators already exist. Examples include: those in the Transit Capacity and Quality of Service Manual (TCQSM)(Kittleson & Associates et al. 2013Kittleson & Associates, Parsons Brinckerhoff, KFH Group, Texas A&M Transportation Institute, and ARUP. 2013. Transit Capacity and Quality of Service Manual, Third Edition. Third Edition, TCRP Report 165. Washington DC: Transportation Research Board; Transportation Research Board. http://www.trb.org/Main/Blurbs/169437.aspx.), the Transit Score metric (Walk Score 2023Walk Score. 2023. “Transit Score Methodology.” https://www.walkscore.com/transit-score-methodology.shtml.) and many more.

Practitioners, researchers and advocates seeking to use such metrics may face two inter-related challenges: (1) there is the problem of calculating the metrics themselves for a specific location and service pattern; and (2) is the challenge of explaining the metrics, their meaning and importance to those who are not specialists in transit, such as to politicians or the general public1 Of the examples above, the metrics in the TCQSM appear: difficult to calculate in practice, and difficult to explain because there are a multitude of indicators (although there is an entire guidebook explaining them, which might help somewhat); while, in contrast, Transit Scores can be obtained simply by typing an address into a website, but cannot be calculated independently and lack a detailed (and open source) description of the methodolgy / algorithm.. However, a relatively simple transit Supply Index (SI) has been previous developed (Currie and Senbergs 2007Currie, Graham, and Zed Senbergs. 2007. Identifying spatial gaps in public transport provision for socially disadvantaged Australians: the Melbourne needs-gap study.” Australasian Transport Research Forum.), This reduces service levels to a single score (like the Transit Score), but is open and can be independently calculated by anyone. It is obtained by calculating the number of transit arrivals at stops within an area of interest, with an adjustment made to account for the typical walk-access catchment for each stop. Hence, higher SI scores indicate areas with higher frequency and/or better coverage.

Unfortunately, the SI does not appear to have been widely used, perhaps in part because at the time it was first published timetable data was not typically publicly available in a standardized and machine-readable format. The scores reported in Currie and Senbergs (2007) has been calculated directly from a database of services provided by the transit authority in Melbourne, Australia. However, this database appears to have been in a format specific to Victoria and the agency itself2 Public Transport Victoria (PTV), and so if SI scores for a different location were desired3 Or perhaps even for Melbourne again, but at a different time given that the database format has likely changed and the Currie and Senbergs (2007) analysis algorithms are not readily available. considerable work would be required to wrangle the data and calculate scores.

However, since the widespread adoption of the General Transit Feed Specification (GTFS), timetable data and tools for processing it are now much more widely available than they were in 2007. More than 10,000 agencies are now providing GTFS feeds4 There are two forms: GTFS-static consisting of the timetable data (the scheduled services); and GTFS-realtime, which includes vehicle arrivals and departure times based on real-world position data. This paper and project uses only the GTFS-static (timetable) format.(MobilityData undatedMobilityData. undated. General Transit Feed Specification (GTFS). {https://gtfs.org/}.), suggesting that the development of code to calculate SI scores directly from GTFS might allow it to be used more widely in research and practice.
Previous work undertaken by Monash University’s Public Transport Research Group (PRTG), available on Github (Reynolds 2023Reynolds, James. 2023. “Transit_supply_index_GTFS.” https://github.com/James-Reynolds/Transit_Supply_Index_GTFS.), developed R functions to calculate SI scores from the Victorian PTV GTFS feed. However, the code was inefficient5 To calculate SI scores for the Victorian GTFS feed would take the original code base approximately as long as it the service delivery itself took i.e. (SI scores fora whole week of transit service would take a whole week to compute!). and untidy, and only allowed scores to be calculated for a whole day of transit service.

More recently, PTRG has commenced a project which requires SI scores by hour of the day. Unfortunately, the current code does not have this capability, and major changes will be needed to calculate stop arrivals on an hourly, rather than daily, basis. However, this also provides an opportunity to revise and improve the code so that it is more readily accessible, usable and understandable for others, and quicker.

This document reports the development of code to calculate SI scores from GTFS datasets as an R package (Reynolds 2024Reynolds, James. 2024. “Gtfssupplyindex.” https://github.com/James-Reynolds/gtfssupplyindex.). Structuring the code as an R package6 Rather than as scripts within a R Markdown file, as for the original Transit_Supply_Index_GTFS efforts provides various advantages as far as adhering to standardised conventions, accessibility and sharing, testing and so on (Wickham and Bryan 2023Wickham, Hadley, and Jennifer Bryan. 2023. R Packages. " O’Reilly Media, Inc.". https://r-pkgs.org/.). More broadly, the motivation for this research is to better understand how GTFS data might be used to produce benchmarking metrics that can be calculated using open-source code. Such metrics might then be able to be used to assess proposed network changes or other analyses without the need for specialist software or bespoke calculation7 More formally, the (null) hypothesis tested in this research is that the Supply Index cannot be calculated directly from a GTFS feed.. A related objective is to increase the availability of metrics that are relatively easy to understand and use when making decisions about or advocating for changes to existing services, including for those who may not be technical specialists in transit planning and scheduling.

The rest of this document is structured as follows: the next section discusses the research context of transit metrics and the the Supply Index. In the third section the methodology adopted for the code development is outlined, including discussion of the case studies (GTFS feeds) used to test and verify the code output. In the fourth section results are presented, including SI scores for SA1s across Greater Melbourne on an hour-by-hour basis. Results are then discussed, followed by a brief conclusion that includes the identification of directions for future research.

Research context

Even a brief search shows that there is a very large number of metrics available for benchmarking transit services. Examples include: (1) those in the Transit Cooperative Research Program (TCRP) Report 88, which is an extensive guidebook on developing a performance-measurement system (Ryus et al. 2003Ryus, Paul, M Connor, S Corbett, A Rodenstein, L Wargelin, L Ferreira, Y Nakanishi, and K Blume. 2003. “TCRP Report 88: A Guidebook for Developing a Transit Performance-Measurement System.” Transit Cooperative Research Program.); (2) online databases provided by the Florida Transit Information System (FTIS) (Florida Transit Information System 2018Florida Transit Information System. 2018. “Urban Integrated National Transit Database.” http://www.ftis.org/urban_intd.aspx.) and International Association of Public Transport (UITP) (2015International Association of Public Transport (UITP). 2015. “Mobility in Cities Database 2015.” Brussels, Belgium. uitp.org/publications/mobility-in-cities-database/.); (3) those used in the extensive annual benchmarking programme undertaken yearly by the Transport Strategy Centre, which includes over 100 transit providers around the world (Imperial College London undatedImperial College London. undated. “Transport Strategy Centre (TSC); Applied Research.” undated. https://www.imperial.ac.uk/transport-engineering/transport-strategy-centre/applied-research/.); and (4) a recently developed methodology to calculate ‘blank spots’ within an area, being those places beyond 400/800 metre walking distances to/from bus and tram stops/train stations (Alamri et al. 2023Alamri, Sultan, Kiki Adhinugraha, Nasser Allheeib, and David Taniar. 2023. “GIS Analysis of Adequate Accessibility to Public Transportation in Metropolitan Areas.” ISPRS International Journal of Geo-Information 12 (5): 180.).

The Fielding Triangle (Fielding 1987Fielding, Gordon J. 1987. Managing public transit strategically: a comprehensive approach to strengthening service and monitoring performance. 1st ed. Jossey-Bass Public Administration Series. San Francisco: Jossey-Bass Publishers.) provides a framework for understanding how such metrics combine service inputs, service outputs and service consumption to describe cost efficiency, cost effectiveness or service effectiveness. At a larger scale, Litman (2003Litman, Todd. 2003. “Measuring Transportation: Traffic, Mobility and Accessibility.” 10. Vol. 73. Institute of Transportation Engineers. ITE Journal. Washington, D.C.: Institute of Transportation Engineers.) and Litman (2016Litman, Todd. 2016. “When Are Bus Lanes Warranted? Considering Economic Efficiency, Social Equity and Strategic Planning Goals.” Victoria Transport Policy Institute. http://www.vtpi.org/blw.pdf.) discuss some of the traffic, mobility, accessibility, social equity, strategic planning and other rational decision-making frames that might underlie such transit metrics, while Reynolds et al. (2017Reynolds, James, Graham Currie, Geoff Rose, and Alistair Cumming. 2017. “Moving Beyond Techno-Rationalism: New Models of Transit Priority Implementation.” In Australasian Transport Research Forum 2017. Auckland, New Zealand.) extends this into models of how institutionalism, incrementalism and other public policy models might apply to decision-making processes. Further examples include: (1) Guzman, Oviedo, and Rivera (2017Guzman, Luis A., Daniel Oviedo, and Carlos Rivera. 2017. “Assessing Equity in Transport Accessibility to Work and Study: The Bogotá Region.” Journal of Transport Geography 58: 236–46.), who develop a measure of accessibility in the context of policy development and social equity for Latin American Bus Rapid Transit (BRT) based networks; and (2) the street space allocation metrics based around 10 ethical principles introduced by Creutzig et al. (2020Creutzig, Felix, Aneeque Javaid, Zakia Soomauroo, Steffen Lohrey, Nikola Milojevic-Dupont, Anjali Ramakrishnan, Mahendra Sethi, et al. 2020. “Fair Street Space Allocation: Ethical Principles and Empirical Insights.” Transport Reviews 40 (6): 711–33. https://doi.org/10.1080/01441647.2020.1762795.).

However, many of these metrics appear difficult to calculate, complex to explain or understand, and likely not well suited to communication with those who are not transit planners or engineers, or otherwise technical specialists. Where pre-calculated metrics are immediately available it may not be possible for practitioners, researchers or advocates to independently generate metrics for proposed system changes or to even know exactly how scores for the existing services levels are calculated. For example, Transit Scores for locations with a published GTFS feed are readily available on a website, eliminating the need for any calculations. The meaning of these Transit Scores appears easy to explain, as the highest possible score of 100 represents what might be experienced in the centre of New York(Walk Score 2023Walk Score. 2023. “Transit Score Methodology.” https://www.walkscore.com/transit-score-methodology.shtml.)]. However, the Transit Score algorithm is patented and effectively a black box. It is not possible to calculate scores independently or understand how the metric might change with alteration to the transit system or services, or the surrounding environment. Transit Score, therefore, fails the first of the aforementioned challenges, as practitioners, researchers and advocates can only use those scores provided by Walk Score (2023Walk Score. 2023. “Transit Score Methodology.” https://www.walkscore.com/transit-score-methodology.shtml.) While the metric is simple to explain, as the closer to 100, the better, because it is based on a patented algorithm it may not be easy to understand or explain the connection between real-world conditions and the Transit Score, or what might need to be done to improve the score and service levels. Nor does it appear to be possible for Transit Scores to be generated for proposed changes to networks.

Another example is the TCQSM, which specifies Levels of Service (LOS) between A and F across a range of factors8 Including service span, frequency, speed, the proportion of the population serviced, competitiveness of travel times to car-based travel, and many more.. This scoring scheme appears relatively simple to explain9 A is good and F is bad. Also this scoring system matches the A to F LOS scoring used in many traffic capacity analysis software and manuals., and the detail within Kittleson & Associates et al. (2013Kittleson & Associates, Parsons Brinckerhoff, KFH Group, Texas A&M Transportation Institute, and ARUP. 2013. Transit Capacity and Quality of Service Manual, Third Edition. Third Edition, TCRP Report 165. Washington DC: Transportation Research Board; Transportation Research Board. http://www.trb.org/Main/Blurbs/169437.aspx.) provides a resource for anyone wanting to better understand what the scores mean. However, calculation of many of TCQSM metrics may need specialised software and datasets10 For example, the Service Coverage Area metric in the TCQSM (pp. 5-8 to 5-21) may require GIS or other analysis, on top of accurate data about population densities, stop locations and service schedules. and it might be challenging to explain the detail of these measures or how to improve them to non-technical decision-makers, stakeholders or others involved in transit management or advocacy.

The introduction of the General Transit Feed Specification (GTFS) and widespread release of schedule data in this format, however, has helped towards making transit metrics more broadly available and useable. GTFS is an open, text-based format that was developed originally to allow transit information to be included in the Google Maps navigation platform (MobilityData undatedMobilityData. undated. General Transit Feed Specification (GTFS). {https://gtfs.org/}.). The data structure is shown in the below figure.

GTFS entity relationship diagram. Source: adapted by author from Alamri et al (2023) and the GTFS Schedule Reference (16/11/2023 revision).

GTFS entity relationship diagram. Source: adapted by author from Alamri et al (2023) and the GTFS Schedule Reference (16/11/2023 revision).

In the Entity Relationship Diargram (ERD) shown above, each box represents a database table in the GTFS, with table rows indicating the variables (columns) included in each11 For example, each record in the ‘stops’ table includes a value for stop_id, stop_name, stop_lat and stop_lon.. Relationships between the tables are indicated by the connecting lines, and Primary Key (PK) and Foreign Key (FK) designations12 For example, stop_id also appears in the ‘stop_times’ table as a Primary Key and Foreign Key.. `Crow’s feet’ indicate the relationships between each table13 See https://i.stack.imgur.com/fxaAq.png for guide to the symbols. But, for example, the stops table is required, with the stop_id field providing a unique (primary) key for every stop. Within the stop_times table (which is also required) the stop_id field is a foreign key. Each unique stop_id can appear many times in the stop_times table, but must appear only once in the stops table. In the stop_times table each combination of trip_id, stop_id and arrival time must be unique (But, see note 2!) meaning that these fields represent a composite key..

GTFS now provides a mechanism for including individual transit systems in many online products and analyseses, including the Transit Score metric itself. Wong (2013Wong, James. 2013. “Leveraging the General Transit Feed Specification for Efficient Transit Analysis.” Transportation Research Record 1 (2338): 11–19. https://doi.org/10.3141/2338-02.) provides another example of what can be done with GTFS data, having developed code to calculate of some of the TCQSM metrics14 Daily average headways, route length and stop numbers for 50 transit operators.. While the Wong (2013Wong, James. 2013. “Leveraging the General Transit Feed Specification for Efficient Transit Analysis.” Transportation Research Record 1 (2338): 11–19. https://doi.org/10.3141/2338-02.) open-source code is readily available15 https://github.com/jcwong86/GTFS_Explore_Tool this is now 11 years old and does not appear to be currently maintained. Future research may involve reviewing this code and using it to analyse modern GTFS feeds. However, in this paper the aim is more modest, being to use GTFS data to calculate Currie and Senbergs’ (2007) SI.

The Suppy Index

\[\begin{equation} SI_{area, time} = \sum{\frac{Area_{Bn}}{Area_{area}}*SL_{n, time}} \end{equation}\]

The Supply Index (SI) equation is shown in the margin figure16 Minor adjustments have been made to generalise the equation, as Currie and Senbergs (2007) focus was the context of Melbourne’s Census Collection Districts (CCD) and calculations based on a week of transit service. CCDs predate the introduction of Statistical Areas 1, 2, 3, and 4 (SA1, SA2, SA3, SA4), and other geographical divisions currently used by the Australian Bureau of Statistics (ABS), which may be more familiar to readers., in which: (1) \(SI_{area, time}\) is the Supply Index for the area of interest and a given period of time; (2) \(Area_{Bn}\) is the buffer area for each stop (n) within the area of interest. In Currie and Senbergs (2007) this was based on a radius of 400 metres for bus and tram stops, and 800 metres for railway stations; (3) \(Area_{area}\) is the area of the area of interest; and (4) \(SL_{n,time}\) is the number of transit arrivals for each stop for a given time period.

An advantage of the SI is that it is a relatively simple number to calculate, understand and explain. It describes the number of transit arrivals at stops within an area of interest and time frame, multiplied by a factor accounting for the proportion of the area of interest that is within typical walking distance of each stop. Hence, more services, more stops and higher frequencies would all increase the SI score. The SI does not incorporate service span, speed or other elements of a transit service. These may be important to passenger experience, but might add considerable complexity. Simplicity is also helped by the way that the Index is additive, in that \(SI_{area, time}\) scores can be aggregated to calculate an overall score across multiple time periods or for a region encompassing multiple areas of interest.

Methodology

R (R Core Team 2023R Core Team. 2023. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.), a widely used and readily available statistical programming language, was adopted for code development. The package development setup and workflow described by Wickham and Bryan (2023Wickham, Hadley, and Jennifer Bryan. 2023. R Packages. " O’Reilly Media, Inc.". https://r-pkgs.org/.) was adopted in this study.

Various existing packages were relied upon including: the sf package (Pebesma 2023Pebesma, Edzer. 2023. Sf: Simple Features for r. https://r-spatial.github.io/sf/.) for geospatial analysis; the tidyverse (Wickham et al. 2019Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.); gtfstools (Daniel Herszenhut et al. 2022Herszenhut, Daniel, Rafael H. M. Pereira, Pedro R. Andrade, and Joao Bazzo. 2022. Gtfstools: General Transit Feed Specification (GTFS) Editing and Analysing Tools. https://ipeagit.github.io/gtfstools/.); and tidytransit (Poletti et al. 2023Poletti, Flavio, Daniel Herszenhut, Mark Padgham, Tom Buckley, and Danton Noriega-Goodwin. 2023. Tidytransit: Read, Validate, Analyze, and Map GTFS Feeds. https://github.com/r-transit/tidytransit.). Some code was adapted from the tidytransit, gtfstools and other package’s examples, vignettes and other documentation. Tidytransit is licensed under GPL-2 | GPL-3, while gtfstools is lincensed under the more permissive MIT license. For simplicity, the gtfssupplyindex package developed here is licensed under GPL-3 so as to match tidytransit.

Cases

Mornington Penninsula SA1 zones and location of Mornington Tourist Rail stops. Mornington Penninsula SA1 zones and location of Mornington Tourist Rail stops.

Code development was undertaken using a number of cases for testing purposes, being: the Mornington Penninsula Tourist Railway, the New York subway, and Melbourne.

The Morning Penninsula Tourist Railway runs on Sundays and Wednesdays between Moorooduc and Mornington, with an intermediate stop at Tanti Park17 https://transitfeeds.com/p/mornington-railway/806/latest/stops. A GTFS feed from 2018 was selected. ABS data was also used, primarily through the strayr and absmapsdata packages (Mackey et al. 2023Mackey, Will, Matt Johnson, David Diviny, Matt Cowgill, Bryce Roney, William Lai, and Benjamin Wee. 2023. “Strayr.” https://runapp-aus.github.io/strayr/.). The Mornington Peninsular SA3 zone and the SA1 zones contained within were adopted as the areas_of_interest.

Tidytransit includes a sample GTFS feed from New York’s MTA (including the subway!), and so this was used for code tests were appropriate.

Larger scale testing was performed using the Victorian GTFS feed, published by Public Transport Victoria (PTV), sourced via Transit Mobility Data, (2023Transit Mobility Data,. 2023. “PTV GTFS - OpenMobilityData.” 2023. https://transitfeeds.com/p/ptv/497.) for historical feeds. Again, ABS data was used for the areas_of_interest.

Results

Code structure and output

Developed code is available and documented on github (Reynolds 2024Reynolds, James. 2024. “Gtfssupplyindex.” https://github.com/James-Reynolds/gtfssupplyindex.). The structure and functions used to generate each table are shown in the below Entity Relationship Diagram (ERD).

Entity Relationship Diagram (ERD) showing the data structure and functions

Entity Relationship Diagram (ERD) showing the data structure and functions

The package takes input from three files:

It outputs the si_by_area_and_hour table (bottom right), which reports the SI score for each hour of the day across dates specified by the user.

Mornington Penninsula Tourist Railway hourly SI values for December 30, 2018, for SA1 zones

area_id 10 11 12 13 14 15
214021381 0.0000672 0.0522962 0.0523635 0.0000672 0.0522962 0.0523635
214021385 0.0000000 0.0067970 0.0067970 0.0000000 0.0067970 0.0067970
214021591 0.2436873 0.1366432 0.3803305 0.1366432 0.2436873 0.3803305
214021592 0.0684965 0.0000000 0.0684965 0.0000000 0.0684965 0.0684965

Functions

This section briefly describes each of the functions shown in the above ERD, and how these facilitate the calculation of the SI scores.

gtfs_by_route_type function

Entity Relationship Diagram (ERD) excerpt, gtfs_by_route_type function Entity Relationship Diagram (ERD) excerpt, gtfs_by_route_type function

GTFS data is first loaded, with the gtfs_by_route_type function splitting this into a list (by route_type) of tidygtfs objects. This is achieved using the filter_by_route_type function from the gtfstools package (Danile Herszenhut et al. undatedHerszenhut, Danile, Rafael H. M. Pereira, Pedro R. Andrade, and Joao Bazzo. undated. Gtfstools; Filter GTFS Object by Route Type (Transport Mode). https://ipeagit.github.io/gtfstools/reference/filter_by_route_type.html.).

#load the revised mornington GTFS data
list_gtfs = gtfssupplyindex:::gtfs_by_route_type(system.file(
  "extdata/mornington180109",
  "gtfs.zip", 
  package = "gtfssupplyindex", 
  mustWork = TRUE))

names(list_gtfs) %>% kable(caption = "tidygtfs objects within list_gtfs")

tidygtfs objects within list_gtfs

x
rail
names(list_gtfs[[1]]) %>% kable(caption = "tidygtfs structure of first element of list_gtfs")

tidygtfs structure of first element of list_gtfs

x
agency
calendar
calendar_dates
fare_attributes
fare_rules
feed_info
routes
shapes
stop_times
stops
trips
.

load_areas_of_interest function

Entity Relationship Diagram (ERD) excerpt, load_areas_of_interest function Entity Relationship Diagram (ERD) excerpt, load_areas_of_interest function

Geographical data about the areas of interest are first loaded by the load_areas_of_interest.R function into an sf object using the Pebesma (2023Pebesma, Edzer. 2023. Sf: Simple Features for r. https://r-spatial.github.io/sf/.) package. The resultant areas_of_interest table contains each area_id and its associated geometry.

## Reading layer `mornington_sa12021' from data source 
##   `C:\Users\rjulian\Documents\gtfssupplyindex\inst\extdata\mornington_sa12021.geojson' 
##   using driver `GeoJSON'
## Simple feature collection with 392 features and 1 field
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 144.6514 ymin: -38.49738 xmax: 145.2615 ymax: -38.16239
## Geodetic CRS:  WGS 84

First 6 entries in areas_of_interest table

area_id geometry
21402137701 MULTIPOLYGON (((144.9617 -3…
21402137702 MULTIPOLYGON (((144.9916 -3…
21402137703 MULTIPOLYGON (((144.9923 -3…
21402137704 MULTIPOLYGON (((144.9878 -3…
21402137705 MULTIPOLYGON (((145.0015 -3…
21402137706 MULTIPOLYGON (((145.0088 -3…

Data about buffer zones, specifically the walking distance threshold assigned to each route_type (mode) is then loaded, again through a function (load_buffer_zone.R). The package includes this information in a csv file, in which it is assumed that the buffer zone is definied in metres.

First six entries in buffer_distance definitions

route_type buffer_distance short_name
0 400 lrt
1 800 subway
2 800 rail
3 400 bus
4 800 ferry
5 400 cable_tram

stops_in_walk_dist function

Entity Relationship Diagram (ERD) excerpt, stops_in_walk_dist function

Entity Relationship Diagram (ERD) excerpt, stops_in_walk_dist function

The stops_in_walk_dist function then generates a list (by route_type) in which each element is a datea table describing which stops are within walking distance of which areas of interest. Each table entry includes a stop_id, an area_id that is within the buffer_distance threshold of that stop, and the corresponding area related terms in the SI calculation18 This is the \(Area_{Bn} / Area_{Area}\) bit.

‘Rail’ element of the stops_in_or_near_areas list for the Mornington Pennisula datasets, first six entries

stop_id area_id area_terms
1388695887 21402159101 0.7999912
1388695887 21402159102 0.0168220
1388695887 21402159105 0.6779951
1388695887 21402159107 0.6453927
1388695887 21402159111 0.2011127
1388695887 21402159113 0.1081424

The variables passed to the stop_in_or_near_areas function are list_gtfs19 The list of tidygtfs objects ouput by the gtfs_by_route_type function, the areas_of_interest table20 Which is the output of the load_areas_of_interest function, the buffer_distance table21 Output by the load_buffer_zones function, and an EPSG_for_transform variable. This last variable is the Coordinate Reference System (CRS) value relevant to the geographic location. It is used to project the latitude and longitude values included in the GTFS data and area_of_interest data into metres, in this case relating to the GDA94 / MGA zone 55 relevant to Australia22 https://epsg.io/28355.

The stops_in_walk_dist function is complicated by the need to have different buffer distances for each route_type, and to only include those parts of the walking catchment that are within each area of interest. It is structured as follows:

  1. The first part of the stops_in_walk_dist function looks up the buffer_distance_length specific to each route_type in the list (by route_type) of tidygtfs objects. This value is appended to each tidygtfs object as an additional element (named buffer_distance).

  2. Next the areas_of interest are transformed from latitude and longitude into metres, and the area is calculated.

  3. The stops_in_walking_distance function then applies a sub-function, stops_in_walk_dist_one_route, to the list_gtfs (list of tidygtfs objects), in which:

  4. A list of stops is extracted from the tidygtfs, using the stops_as_sf function from Poletti et al. (2023Poletti, Flavio, Daniel Herszenhut, Mark Padgham, Tom Buckley, and Danton Noriega-Goodwin. 2023. Tidytransit: Read, Validate, Analyze, and Map GTFS Feeds. https://github.com/r-transit/tidytransit.).

  5. Circles are then drawn around each stop, with the radius equal to the buffer distance. Intersecting these circles with the areas_of_interest then outputs an sf showing the catchment of each stop within each area of interest

  6. Finally, the \(area_{Bn}\) terms are calculated for each combination of stop_id and area_id,

The stops_in_walk_dist function includes a mode with output printed at each intermediate step (verbose = TRUE). The below shows the Morington Penninsula railway calculations again (as per the previous table), but run with verbose = TRUE so that intermediate steps are printed.

stops_in_or_near_areas <- gtfssupplyindex:::stops_in_walk_dist(
  list_gtfs = list_gtfs, 
  areas_of_interest = areas_of_interest,
  EPSG_for_transform = 28355, 
  verbose = TRUE
)

Step 5, circles around each stop, showing the intersections with the areas_of_interest, all stops

Step 5, circles around each stop, showing the intersections with the areas_of_interest, all stops

as above, but from each stop individually

as above, but from each stop individually

Calculating stop arrivals and the SI, SI_total and hourly

Entity Relationship Diagram (ERD) excerpt, si_calc, si_total and hourly functions

Entity Relationship Diagram (ERD) excerpt, si_calc, si_total and hourly functions

The si_calc.R function takes the stops_in_or_near_areas list (by route_type) of dataframes and the list_gtfs list (by route_type) of tidygtfs objects and calculates the si_by_route_type23 Which, again, is a list (by route_type) of dataframes, each containing a record for each area_id and combination of date, start_time and end_time specified by the user, and the corresponding (calculated) SI value.

The tidytransit package includes an article about generating a departure timetable from a gtfs dataset (Poletti undatedPoletti, Flavio. undated. Tidytransit: Generate a Departure Timetable. https://r-transit.github.io/tidytransit/articles/timetable.html.). Code from that article was adapted from this example to create functions to calculate the number of departures and arrivals from (a vector of) stop_ids within a given time period. These functions are included in the package24 See departures_and_arrivals.R and called by the si_calc function25 Although this is not shown on the ERD. Output from the arrivals function is shown in the bellow table.

stop_ids <- list_gtfs[[1]]$stops %>%
 dplyr::select(stop_id)

arrivals_by_stop_id <- gtfssupplyindex::arrivals(
 gtfs = list_gtfs[[1]],
 stop_ids = stop_ids,
 date_ymd = "2018-12-30",
 start_hms = lubridate::hms("10:30:00"),
 end_hms = lubridate::hms("16:00:00")
)

arrivals_by_stop_id %>% kable(caption = "Arrivals at each stop for Sunday December 30th 2018, Mornington Peninsula tourist railway.")

Arrivals at each stop for Sunday December 30th 2018, Mornington Peninsula tourist railway.

stop_id arrivals
1388695887 4
1452182324 8
650916735 4

This matches the number of trips shown in the Mornington Railway GTFS feed, being 4 in each direction26 https://transitfeeds.com/p/mornington-railway/806/latest/stop/1388695887/20181230.

Arrivals at Mornington Station (stop_id 1388695887) for 30/12/2018

Arrivals at Mornington Station (stop_id 1388695887) for 30/12/2018

All the inputs to calculate the si are now available. Hence, the SI.calc function can be run, resulting in the si_by_route_type list (by route_type) of tables showing the area_id corresponding SI values

SI values for Mornington Penninsula Railway services on 30/12/2018 (full day)

area_id SI
214021381 0.2094539
214021385 0.0271880
214021591 1.5213219
214021592 0.2739859

The si_total function aggregates the si_by_route_type tables so that values are no longer separated by mode. Although in the case of the Mornington Penninsula Railway there is only one route_type.

Finally, the hourly function runs the si_calc and si_total functions for every hour in a single day. It outputs a table showing the SI scores for each area for each hour of the day27 Across the service span. The below table shows this output, together with row and column totals.

Mornington Penninsula Tourist Railway hourly SI values for December 30, 2018, for SA1 zones

area_id 10 11 12 13 14 15 Total
214021381 0.0000672 0.0522962 0.0523635 0.0000672 0.0522962 0.0523635 0.2094539
214021385 0.0000000 0.0067970 0.0067970 0.0000000 0.0067970 0.0067970 0.0271880
214021591 0.2436873 0.1366432 0.3803305 0.1366432 0.2436873 0.3803305 1.5213219
214021592 0.0684965 0.0000000 0.0684965 0.0000000 0.0684965 0.0684965 0.2739859
Total 0.3122510 0.1957364 0.5079874 0.1367104 0.3712770 0.5079874 2.0319496

Testing the package on the Mornington Peninsula Tourist Railway and (just) the Mornington Peninsula SA3 zone

In the previous sections the code structure, output and functions were described. Results the Mornington Peninsula Tourist Railway’s GTFS data set and the SA1 zones were also presented as an example case.

In this section the same GTFS data is used, but with the areas of interest set instead to be the entire Mornington Peninsula SA3 area. As all three of the Mornington Peninsula Raiway’s stops are located within this SA3 zone the calculation of the SI scores by hand is relatively simple, and is used here as a check on the results.

Mornington Penninsula Tourist Railway catchments within the Mornington Penninsula SA3 zone Mornington Penninsula Tourist Railway catchments within the Mornington Penninsula SA3 zone

Mornington Penninsula Tourist Railway catchments within the Mornington Penninsula SA3 zone Mornington Penninsula Tourist Railway catchments within the Mornington Penninsula SA3 zone

#load the revised mornington GTFS data
list_gtfs = gtfssupplyindex:::gtfs_by_route_type(system.file(
  "extdata/mornington180109",
  "gtfs.zip", 
  package = "gtfssupplyindex", 
  mustWork = TRUE))

areas_of_interest <- load_areas_of_interest(absmapsdata::sa32021 %>% filter(sa3_name_2021 == "Mornington Peninsula") %>% select(sa3_code_2021),  area_id_field = "sa3_code_2021")

buffer_distance <- gtfssupplyindex:::load_buffer_zones()

stops_in_or_near_areas <- gtfssupplyindex:::stops_in_walk_dist(
  list_gtfs = list_gtfs, 
  areas_of_interest = areas_of_interest,
  EPSG_for_transform = 28355,
  verbose = TRUE
)
kable(stops_in_or_near_areas, caption = "Catchment of each stop within Mornington Penninsula SA3 zone")

Catchment of each stop within Mornington Penninsula SA3 zone

stop_id area_id area_terms
1388695887 21402 0.0027748
1452182324 21402 0.0027748
650916735 21402 0.0027748

As shown in the figures and above tables, the area terms for each of the combinations of stop_id and area_id are ~ 0.0028. All of the catchment areas of each stop fall within the single area_of_interest, being the Mornington Penninsula SA328 area_id 21402.

Checking the area terms calculation is relatively trivial for this case, as the ABS maps data comes with an areasqkm_2021 field. Dividing the catchment area of the stop29 \(Area_{Bn} = \pi0.8^2\) by the area of the area_of_interest30 \(Area_{area} = 724.19\) as follows:

\[\begin{equation} SI_{area, time} = \sum{\frac{Area_{Bn}}{Area_{area}}*SL_{n, time}} \end{equation}\]

absmapsdata::sa32021 %>% filter(sa3_name_2021 == "Mornington Peninsula")
## Simple feature collection with 1 feature and 11 fields
## Geometry type: MULTIPOLYGON
## Dimension:     XY
## Bounding box:  xmin: 144.6514 ymin: -38.49884 xmax: 145.2615 ymax: -38.16239
## Geodetic CRS:  WGS 84
##   sa3_code_2021        sa3_name_2021 sa4_code_2021        sa4_name_2021
## 1         21402 Mornington Peninsula           214 Mornington Peninsula
##   gcc_code_2021     gcc_name_2021 state_code_2021 state_name_2021 areasqkm_2021
## 1         2GMEL Greater Melbourne               2        Victoria      724.1681
##    cent_lat cent_long                       geometry
## 1 -38.34165  145.0355 MULTIPOLYGON (((145.2129 -3...
pi * .8^2 / 
  (as.numeric(
    absmapsdata::sa32021 %>% 
      st_drop_geometry() %>% 
      filter(
        sa3_name_2021 == "Mornington Peninsula") %>% 
      select(areasqkm_2021)
  ))
## [1] 0.002776454

The calculated area_terms match, albeit with what appears to be some minor rounding errors. This appears to related to the ABS reported square_km (724.1681) being slightly different from the m2 reported by the st_area function used within the package (724,272,059). Likely this is related to the ABS having a slightly different methodology for calculating the area, and the error is approximately 0.015%.

Completing the calculations by hand gives:

stop_id 1388695887:

stop_id 1452182324

stop_id 479306570

totals

Completing the calculations using the package gives:

si_by_route_type <- si_calc(
    list_gtfs = list_gtfs,
    stops_in_or_near_areas = stops_in_or_near_areas, 
    date_ymd = lubridate::ymd("2018-12-30"), 
    start_hms = lubridate::hms("10:30:00"),
    end_hms = lubridate::hms("16:00:00"),
    verbose = TRUE)

si_by_route_type %>% kable(caption = "SI values for Mornington Penninsula Railway services on 30/12/2018 (full day)")

SI values for Mornington Penninsula Railway services on 30/12/2018 (full day)

area_id SI
21402 0.0443966
si_by_area_and_hour_wider <- hourly(list_gtfs, stops_in_or_near_areas, "2018-12-30")

si_by_area_and_hour_wider %>% adorn_totals(where = "col") %>% kable(caption = "Mornington Penninsula Tourist Railway hourly SI values for December 30, 2018, for SA1 zones")

Mornington Penninsula Tourist Railway hourly SI values for December 30, 2018, for SA1 zones

area_id 10 11 12 13 14 15 Total
21402 0.0055496 0.0055496 0.0110991 0.0027748 0.0083244 0.0110991 0.0443966

Again, the results largely match31 Accounting again for the minor difference between the ABS and function-calculated areas of the Mornington Peninsula SA3.

A larger test: the Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone

The north of the Melbourne CBD was selected for testing the code as it is may be familiar to readers, and has three different transit modes. The SA1 and SA2 zone boundaries are shown below.

SA1 zone boundaries within the Melbourne CBD - North SA2, Source: ABS

SA1 zone boundaries within the Melbourne CBD - North SA2, Source: ABS

Trains stop at Melbourne Central and Flagstaff stations. Trams run along Elizabeth, Swanston, William, La Trobe and other streets. There are also bus services throughout the area, including along Queen Street.

First step is to load the PTV GTFS data. Some data wrangling is required as there are duplicate stop_ids in the stop definitions.

##-----THIS CHUNK ONLY NEEDS TO BE RUN ONCE TO CREATE THE gtfs_duplicate_stops_removed.zip file-----HENCE EVAL = FALSE ABOVE


ptv_231228 <- tidytransit::read_gtfs("data/ptv_231228/gtfs.zip")
# This results in "Warning: Duplicated ids found in: stops The returned object is not a tidygtfs object, you can use as_tidygtfs() after fixing the issue."

#So, remove the duplicated stops 
#identify duplicate stops
ptv_231228_duplicated_stops <- tabyl(ptv_231228$stops$stop_id) %>% filter (n>1)
names(ptv_231228_duplicated_stops) <- c("stop_id", "n", "percent")
ptv_231228_duplicated_stops <- left_join(ptv_231228_duplicated_stops, ptv_231228$stops)

##discard duplicates
ptv_231228$stops <- ptv_231228$stops[!duplicated(ptv_231228$stops$stop_id),]

## Write gtfs back to file
ptv_231228 <- as_tidygtfs(ptv_231228)
tidytransit::write_gtfs(ptv_231228, "data/ptv_231228/gtfs_duplicate_stops_removed.zip")

Now that the duplicate stop_ids have been removed and the gtfs feed written back to file (“data/ptv_231228/gtfs_duplicate_stops_removed.zip”), the gtfs_by_route_type function can be run.

## convert to list of tidygtfs objects
ptv_231228_list_gtfs <- gtfssupplyindex::gtfs_by_route_type("data/ptv_231228/gtfs_duplicate_stops_removed.zip")

Trams only

Looking first at the trams only, running the stops_in_walk_dist function with verbose = TRUE gives the following output

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, trams

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, trams

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, trams, by stop, first six stops

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, trams, by stop, first six stops

In general, the results appear to meet expectations. The first stop has a stop id of 17591. This stop is located at Russell and Bourke Street32 https://transitfeeds.com/p/ptv/497/latest/stops?q=17591. A 400 metres catchment overlaid on this stop is shown in the margin33 Note: Roughly drawn from the ABS maps.. This matches the code output shown above (top left of figure).

SA1 zone boundaries within the Melbourne CBD - North SA2, overlayed with 400m radius from Russell and Bourke Street. Source: ABS and author SA1 zone boundaries within the Melbourne CBD - North SA2, overlayed with 400m radius from Russell and Bourke Street. Source: ABS and author

Running the hourly function for January 16, 2024 gives the following output:

## [1] "Now calculating 1H 0M 0S to 2H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 2H 0M 0S to 3H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 3H 0M 0S to 4H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 4H 0M 0S to 5H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 5H 0M 0S to 6H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 6H 0M 0S to 7H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 7H 0M 0S to 8H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 8H 0M 0S to 9H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 9H 0M 0S to 10H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 10H 0M 0S to 11H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 11H 0M 0S to 12H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 12H 0M 0S to 13H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 13H 0M 0S to 14H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 14H 0M 0S to 15H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 15H 0M 0S to 16H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 16H 0M 0S to 17H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 17H 0M 0S to 18H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 18H 0M 0S to 19H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 19H 0M 0S to 20H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 20H 0M 0S to 21H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 21H 0M 0S to 22H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 22H 0M 0S to 23H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 23H 0M 0S to 24H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 24H 0M 0S to 25H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 25H 0M 0S to 26H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 26H 0M 0S to 27H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 27H 0M 0S to 28H 0M 0S"
## [1] "Now calculating lrt"
## [1] "Now calculating 28H 0M 0S to 29H 0M 0S"
## [1] "Now calculating lrt"

Victorian Trams and SA1 zones within the Melbourne CBD - North SA2 zone, hourly SI values for January 16, 2024, first 6 SA1 zones, zeroed columns excluded.

area_id 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00 25:00
20604150401 38 244 354 434 400 367 351 352 363 361 369 411 432 362 279 222 189 164 166 69 2
20604150402 8 59 84 106 110 110 103 103 104 104 107 117 107 95 74 56 48 40 42 15 1
20604150403 8 41 57 70 70 74 68 66 68 67 73 78 66 64 52 43 35 29 30 13 2
20604150404 27 185 267 331 304 280 266 267 276 273 281 313 331 278 215 171 143 125 125 55 2
20604150405 20 129 186 231 222 208 198 199 202 201 205 231 230 197 153 117 100 84 88 37 2
20604150406 29 176 252 312 293 270 258 259 266 263 272 304 312 263 205 158 130 115 117 49 2

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18).

The below figure maps this output.

Victorian Trams and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

Victorian Trams and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

In general, the results match expectations, with higher SI scores for SA1 zones that area closer to the Swanston, Elizabeth and Latrobe St corridors (which are where the trams are!)

Rail only

Looking next at the rail only, running the stops_in_walk_dist function with verbose = TRUE gives the following output

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, rail

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, rail

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, rail, by stop, first six stops

Catchment of each stop within each area of interest, Melbourne CBD - North SA1 zones, rail, by stop, first six stops

In general, the results appear to meet expectations:

  • Flagstaff Railway Station (stop_id 19841) is roughly 800m from the intersection of Swanston Street and Lonsdale Street, which is where the arc shown in the bottom right of the top left figure terminates34 https://transitfeeds.com/p/ptv/497/latest/stop/19841;
  • The entire SA2 is within the 800m catchment of Melbourne Central Station (stop_id 19842);
  • Only a small part of the SA2 is within 800m of Parliament Station (to the south east, stop_id 19843).
  • Only a small part of the SA2 is within 800m of Flinders Street Station (to the south, stop_ids 19854 and 22238). There are two stops related to Flinders Street because there are both Vline and Metro Trains services, which each have a different stop_id35 https://transitfeeds.com/p/ptv/497/latest/stop/19854 and https://transitfeeds.com/p/ptv/497/latest/stop/22238.

Running the hourly function for January 16, 2024 gives the following output:

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone, hourly SI values for January 16, 2024, first 75 SA1 zones, zeroed columns excluded.

area_id 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00 25:00
20604150401 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150402 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150403 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150404 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150405 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150406 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150407 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150408 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150409 87 126 219 257 199 106 97 85 94 108 151 181 202 162 90 63 53 39 36 18 0
20604150410 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150411 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150412 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150413 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150414 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150415 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150416 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150417 98 146 252 298 230 125 114 102 110 125 173 208 232 188 107 75 62 47 44 22 0
20604150418 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150419 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150420 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150421 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150422 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150423 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150424 79 116 201 236 183 97 89 78 86 99 139 166 186 149 82 58 48 35 33 17 0
20604150425 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150426 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150427 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150428 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150429 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150430 95 152 257 303 236 126 117 103 113 130 183 216 243 195 108 79 65 47 45 23 0
20604150431 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150432 84 134 227 266 209 109 102 89 99 115 163 191 216 172 94 69 57 41 38 20 0
20604150433 83 133 225 264 207 108 101 88 98 114 162 190 214 171 93 68 56 40 38 20 0
20604150434 63 97 167 194 153 80 75 65 71 82 115 136 154 122 67 49 40 29 27 14 0

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18). A lot of the SA1 zones have identical SI scores because ALL of their area is within the 800m buffer distance of a railway station, meaning that the area terms cancel out and are equal to one.

The below figure maps this output.

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

In general, the SI scores appear to match expectations. SA1 zones closer to Melbourne Central and Flagstaff have higher scores.

Full SI calculation

This section runs the SI calculation for all modes (lrt, rail, bus) on SA1 zones within the Melbourne CBD - North SA2 zone. Here verbose is set as FALSE to cut down on the amount of output displayed.

Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone, hourly SI values for January 16, 2024, first 75 SA1 zones, zeroed columns excluded.

area_id 2:00 3:00 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00
20604150401 0 0 2 123 389 603 729 636 498 474 463 484 498 554 627 673 558 396 307 258 214
20604150402 0 0 2 122 312 542 711 623 425 393 382 393 413 474 559 610 503 366 286 229 177
20604150403 0 0 2 96 216 361 435 375 256 241 227 238 254 309 357 377 319 221 170 138 108
20604150404 0 0 2 111 328 510 618 532 406 383 373 391 405 460 522 566 467 326 252 208 173
20604150405 0 0 2 138 395 672 855 749 543 506 496 511 533 599 700 763 634 452 356 287 224
20604150406 0 0 2 118 351 556 677 597 451 430 418 435 450 508 583 624 519 369 282 230 190
20604150407 0 0 2 125 326 536 669 591 421 400 388 401 420 485 576 631 511 364 278 224 176
20604150408 0 0 2 118 369 572 687 598 464 441 430 449 463 519 588 636 525 370 287 239 199
20604150409 0 0 4 164 426 715 886 752 575 542 527 548 572 630 729 806 660 466 374 309 246
20604150410 0 0 3 167 475 803 1034 905 664 624 608 631 653 725 852 941 777 547 431 350 274
20604150411 0 0 2 135 397 657 830 725 533 500 490 507 527 590 685 745 617 440 346 281 224
20604150412 0 0 2 129 422 654 784 686 542 517 506 529 544 600 683 733 606 429 337 285 235
20604150413 0 0 2 161 494 829 1056 914 683 641 628 652 673 744 866 958 789 563 450 364 288
20604150414 0 0 2 143 432 712 885 760 573 541 527 552 571 634 738 808 661 464 373 304 243
20604150415 0 0 2 114 272 474 624 541 355 328 316 327 345 403 473 513 427 311 245 195 150
20604150416 0 0 2 149 462 775 993 852 632 589 577 600 619 684 797 872 725 518 417 338 268
20604150417 0 0 5 191 518 862 1103 938 711 668 653 675 696 760 868 947 793 569 450 372 298
20604150418 0 0 2 127 408 634 765 668 525 500 490 511 527 582 659 705 587 416 325 275 227
20604150419 0 0 2 94 207 342 411 351 238 225 211 222 238 290 333 350 299 204 155 126 99
20604150420 0 0 2 124 388 609 745 649 502 478 467 487 502 558 634 678 566 401 310 261 214
20604150421 0 0 2 137 429 696 877 773 578 545 534 552 571 631 725 782 654 473 370 301 245
20604150422 0 0 2 140 431 688 842 723 558 531 516 543 559 617 715 777 636 444 355 297 241
20604150423 0 0 3 151 422 720 922 811 589 550 538 555 578 646 752 821 686 488 382 309 241
20604150424 0 0 2 133 393 643 774 661 518 488 475 497 513 562 649 703 580 410 334 278 224
20604150425 0 0 2 125 320 549 712 618 427 397 387 398 418 481 568 623 512 367 287 229 177
20604150426 0 0 2 142 440 716 893 773 588 555 543 567 586 647 749 814 671 474 375 308 248
20604150427 0 0 2 117 355 553 659 571 440 418 407 427 441 496 563 610 503 350 274 229 190
20604150428 0 0 3 113 309 478 581 496 370 349 336 354 367 426 483 524 437 305 234 191 158
20604150429 0 0 2 121 370 584 709 624 477 455 444 462 477 533 610 654 543 387 296 246 203
20604150430 0 0 3 179 533 874 1094 946 720 680 665 691 714 788 910 1004 825 585 468 383 306
20604150431 0 0 3 105 251 395 488 420 295 277 264 277 292 348 402 430 365 252 186 151 121
20604150432 0 0 4 180 506 854 1098 963 716 672 658 679 702 778 903 996 827 593 465 379 296
20604150433 0 0 3 168 480 814 1040 912 671 632 616 639 661 738 866 963 791 560 441 356 278
20604150434 0 0 1 104 355 548 644 565 459 438 428 447 457 497 566 608 502 357 286 244 203

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18).

The below figure maps this output.

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour

In general, the SI scores appear to match expectations. SA1 zones closer to Melbourne Central and Flagstaff have higher scores.

Melbourne, Victoria

This section presents hourly SI values for all SA1 zones in Greater Melbourne for a typical weekday and weekend. The selected days are Tuesday 10th, Saturday 14th and Sunday 15th of October 2023. These days were selected so as to match the typical timing of the Australian Census (a Tuesday in early October), even though 2023 is not a census year.

##-----THIS CHUNK ONLY NEEDS TO BE RUN ONCE TO CREATE THE gtfs_duplicate_stops_removed.zip file-----HENCE EVAL = FALSE ABOVE

ptv_231006 <- tidytransit::read_gtfs("data/ptv_231006/gtfs.zip")
# This results in "Warning: Duplicated ids found in: stops The returned object is not a tidygtfs object, you can use as_tidygtfs() after fixing the issue."

#So, remove the duplicated stops 
#identify duplicate stops
ptv_231006_duplicated_stops <- tabyl(ptv_231006$stops$stop_id) %>% filter (n>1)
names(ptv_231006_duplicated_stops) <- c("stop_id", "n", "percent")
ptv_231006_duplicated_stops <- left_join(ptv_231006_duplicated_stops, ptv_231006$stops)

##discard duplicates
ptv_231006$stops <- ptv_231006$stops[!duplicated(ptv_231006$stops$stop_id),]

## Write gtfs back to file
ptv_231006 <- as_tidygtfs(ptv_231006)
tidytransit::write_gtfs(ptv_231006, "data/ptv_231006/gtfs_duplicate_stops_removed.zip")

Again, there are duplicate stop_ids in the PTV GTFS dataset. These have been removed and the gtfs feed written back to file (“data/ptv_231006/gtfs_duplicate_stops_removed.zip”), on which the gtfs_by_route_type function can be run.

## convert to list of tidygtfs objects
ptv_231006_list_gtfs <- gtfssupplyindex::gtfs_by_route_type("data/ptv_231006/gtfs_duplicate_stops_removed.zip")

Tuesday 10th October, 2023

Victorian GTFS and SA1 zones within the Greater Melbourne GCCSA, hourly SI values for October 10, 2023, first 75 SA1 zones, 4am to 2am only

area_id 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00 25:00 26:00
20601110601 0 10 27 45 51 51 43 39 38 43 38 47 51 51 51 32 23 18 8 5 3 0 0
20601110605 2 20 86 99 93 85 73 69 65 67 75 88 103 100 86 65 44 38 29 27 18 4 0
20601110606 1 19 69 84 84 73 68 62 60 61 67 75 90 85 70 56 35 29 19 18 12 2 0
20601110608 0 11 24 36 39 36 32 29 29 30 30 34 39 38 33 25 17 13 9 8 5 0 0
20601110609 2 26 64 90 90 89 74 69 66 69 72 82 97 97 85 68 50 41 29 25 16 3 0
20601110610 4 40 99 137 131 133 108 102 95 99 106 121 146 150 130 107 82 66 50 43 29 7 0
20601110611 1 21 47 71 77 78 64 60 57 61 60 70 79 80 75 56 41 33 20 16 10 1 0
20601110612 2 22 67 93 95 97 79 74 69 76 75 88 101 104 95 69 51 40 27 22 15 3 0
20601110613 2 19 61 79 76 76 63 60 53 61 61 71 81 84 77 51 37 29 24 22 15 4 0
20601110614 3 21 67 85 78 81 66 65 57 63 65 76 87 89 81 57 41 32 27 27 18 5 0
20601110615 0 2 16 25 26 26 22 20 18 24 18 25 26 26 28 10 5 4 2 1 1 0 0
20601110616 0 17 49 64 67 56 56 49 49 50 53 59 69 64 53 42 25 21 13 13 8 0 0
20601110617 2 15 58 70 62 68 56 56 52 55 56 65 67 68 64 42 33 21 14 14 10 4 0
20601110618 2 20 64 88 89 90 73 70 64 72 70 83 94 97 89 61 45 35 24 20 14 3 0
20601110619 2 24 64 91 93 94 77 72 68 73 73 85 99 101 92 70 52 42 28 23 15 3 0
20601110620 3 34 98 120 115 117 104 100 95 97 101 113 124 127 119 97 80 60 44 40 19 5 0
20601110621 0 31 68 91 94 93 87 84 84 84 84 88 95 94 92 76 60 44 30 27 9 0 0
20601110622 0 29 67 90 95 86 85 79 78 79 79 85 95 91 84 70 49 38 25 23 9 0 0
20601110623 2 26 77 96 93 91 80 76 73 74 79 88 99 99 91 73 55 43 32 29 16 3 0
20601110624 0 32 71 94 97 96 89 86 86 86 87 91 98 97 94 78 61 45 31 28 10 1 0
20601110625 2 29 80 101 97 99 87 84 80 81 85 95 103 105 100 81 66 50 37 33 16 4 0
20601110626 3 26 99 118 108 99 86 81 76 80 87 102 120 119 100 78 53 45 35 32 21 5 0
20601110627 0 20 63 80 84 69 72 62 63 62 66 74 87 80 65 53 31 26 14 14 8 0 0
20601110628 3 27 96 114 108 103 86 82 76 79 87 103 118 119 104 79 58 47 38 35 23 6 0
20601110629 2 23 84 102 96 86 77 71 67 71 76 88 106 103 87 68 46 39 30 27 18 4 0
20601110630 3 30 99 123 112 107 91 86 79 84 91 105 126 127 108 85 59 50 41 37 25 6 0
20601110701 0 27 91 107 117 89 84 76 76 76 82 93 110 111 104 71 61 37 18 17 13 0 0
20601110702 0 19 64 75 85 70 66 58 59 59 62 67 80 83 76 54 47 30 14 12 9 0 0
20601110703 0 13 53 60 61 48 45 41 41 41 45 54 61 59 54 34 31 16 8 8 5 0 0
20601110704 0 19 67 76 82 66 62 54 55 55 59 68 78 81 75 52 45 27 16 14 10 0 0
20601110705 0 14 36 42 51 47 44 37 38 38 38 37 45 52 50 37 31 23 12 10 8 0 0
20601110706 0 13 35 41 45 42 39 32 34 34 33 37 41 48 46 33 27 20 13 10 8 0 0
20601110707 0 9 32 42 44 43 38 32 39 32 34 37 40 44 47 23 14 11 7 7 7 0 0
20601110708 0 22 56 70 70 66 58 49 57 50 53 59 64 73 78 45 30 24 17 16 16 0 0
20601110710 0 11 33 41 41 42 37 32 36 32 32 38 38 43 44 26 16 13 9 8 8 0 0
20601110712 0 2 36 56 45 45 43 41 44 41 43 44 50 44 47 21 19 7 1 1 1 0 0
20601110713 0 16 67 93 82 78 72 69 69 69 71 73 84 78 91 49 42 22 13 11 11 0 0
20601110714 0 18 54 71 69 62 55 49 55 49 53 60 65 69 76 40 28 19 14 13 13 0 0
20601110715 0 0 14 21 21 22 19 18 19 15 17 22 21 21 21 8 0 0 0 0 0 0 0
20601110716 0 2 42 61 53 61 51 51 51 51 51 52 52 53 51 34 24 8 0 0 0 0 0
20601110717 0 17 46 59 59 54 48 43 47 42 45 52 55 59 64 36 24 17 13 12 12 0 0
20601110718 0 0 29 41 36 41 35 35 35 35 35 36 36 35 36 23 16 6 0 0 0 0 0
20601110719 0 2 29 40 37 41 35 34 35 32 34 37 38 36 38 21 14 5 2 1 1 0 0
20601110720 1 24 49 65 59 55 48 47 46 47 48 51 56 64 72 48 44 33 18 17 13 0 0
20601110721 0 25 51 69 64 55 49 47 47 47 50 54 58 68 75 49 42 32 18 18 14 0 0
20601110722 0 1 15 18 14 17 14 18 14 17 14 17 18 19 19 14 14 12 3 0 0 0 0
20601110723 0 7 20 26 24 22 21 21 20 21 21 22 23 26 28 21 19 15 5 5 4 0 0
20601110724 0 29 72 92 91 67 62 58 58 58 65 74 82 89 88 56 46 31 18 21 15 0 0
20601110725 0 10 39 44 44 34 32 30 30 30 33 40 44 42 39 23 22 11 5 6 4 0 0
20601110726 0 28 92 109 113 83 79 73 73 73 80 92 108 106 100 65 55 33 17 19 13 0 0
20601110727 0 0 23 34 31 34 29 29 29 26 28 31 31 31 31 16 7 2 0 0 0 0 0
20601110728 0 19 67 89 82 79 71 66 68 66 69 73 82 78 91 52 42 24 15 13 13 0 0
20601110729 0 21 61 75 75 56 53 49 49 49 53 62 70 72 71 45 37 24 13 15 11 0 0
20601110730 0 26 89 103 104 81 76 68 69 69 75 89 101 100 95 60 52 30 16 17 12 0 0
20601110731 0 1 15 18 16 16 14 17 14 17 15 17 18 18 18 14 13 10 2 0 0 0 0
20601110732 0 9 31 39 39 38 34 30 34 29 30 37 37 40 42 22 12 10 7 7 7 0 0
20601110733 0 24 59 75 74 69 61 53 60 53 56 64 67 77 82 48 31 25 18 17 17 0 0
20601110734 0 0 12 17 17 20 17 16 18 14 15 20 17 17 17 6 0 0 0 0 0 0 0
20601110735 0 0 12 17 18 20 17 16 18 14 15 20 18 18 18 7 1 1 1 0 0 0 0
20601110736 0 20 51 63 62 61 54 45 52 47 48 55 57 66 69 42 28 23 16 15 14 0 0
20601110901 0 27 65 88 88 79 74 72 70 70 74 77 79 91 93 63 50 34 25 19 15 0 0
20601110902 0 19 37 50 50 43 41 39 38 38 40 42 44 52 54 35 28 19 15 13 11 0 0
20601110903 0 27 59 65 66 62 55 55 53 53 56 59 63 67 73 56 52 31 22 19 10 0 0
20601110904 0 12 25 60 60 54 55 52 52 52 53 52 50 63 59 25 15 11 10 8 8 0 0
20601110905 0 24 51 105 103 92 92 87 87 87 90 86 86 108 103 47 30 22 19 17 17 0 0
20601110906 0 18 61 82 74 73 67 63 63 63 65 66 75 73 85 48 40 22 14 12 12 0 0
20601110907 0 19 38 79 78 69 69 65 65 65 67 65 65 82 79 35 24 17 15 13 13 0 0
20601110908 0 4 26 41 37 40 36 35 35 35 35 35 36 37 38 22 16 7 3 2 2 0 0
20601110909 0 2 35 49 42 48 42 41 41 41 41 41 44 40 44 28 22 8 2 1 1 0 0
20601110910 0 0 27 39 33 38 33 33 33 33 33 33 33 33 33 21 15 5 0 0 0 0 0
20601110911 0 4 9 40 40 38 38 38 38 38 38 36 33 41 36 11 4 3 3 2 2 0 0
20601110912 0 13 26 27 28 29 24 25 24 24 25 28 27 27 30 23 25 14 10 8 2 0 0
20601110913 1 8 48 68 64 67 51 51 51 50 49 54 57 60 57 38 26 10 6 5 2 0 0
20601110914 0 2 33 46 41 46 38 38 38 38 38 39 39 40 40 26 19 7 1 1 1 0 0
20601110915 0 4 7 15 15 15 13 14 13 13 14 13 13 14 14 7 6 3 3 3 1 0 0

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18). The below figure maps this output for just the SA1 zones within the Melbourne CBD - North SA2 zone.

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Victorian rail and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for January 16, 2024, by hour between 5am and 1am

Saturday 14th October, 2023

Victorian GTFS and SA1 zones within the Greater Melbourne GCCSA, hourly SI values for October 10, 2023, first 75 SA1 zones, 4am to 2am only

area_id 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00 25:00 26:00
20601110601 2 4 17 22 28 29 28 28 30 30 30 30 30 26 28 20 14 12 11 8 5 5 3
20601110605 2 18 42 45 52 62 57 64 65 68 58 58 58 58 54 39 34 28 27 27 27 18 7
20601110606 5 14 30 37 44 52 46 55 55 59 49 49 48 47 42 28 24 19 18 18 18 13 7
20601110608 4 7 12 16 20 22 20 22 24 25 23 23 21 21 19 16 11 10 9 9 8 7 5
20601110609 4 18 39 44 50 56 53 58 58 59 57 57 56 56 54 48 37 32 30 27 25 17 8
20601110610 4 29 64 71 77 87 83 90 88 88 88 88 87 89 85 80 65 54 51 47 44 29 11
20601110611 4 12 29 36 43 44 44 45 47 47 47 47 46 44 44 40 28 25 23 19 16 12 7
20601110612 2 15 39 52 56 62 59 61 61 61 61 61 61 57 59 49 37 31 29 26 23 16 6
20601110613 2 16 33 48 48 55 52 52 52 52 52 52 52 46 50 37 31 25 23 23 23 15 6
20601110614 2 19 36 51 51 57 56 56 56 56 54 56 55 51 54 41 37 29 26 26 27 18 7
20601110615 0 1 6 17 16 21 16 16 16 16 16 17 16 11 16 5 4 3 2 2 1 1 1
20601110616 6 11 19 28 33 38 34 41 43 45 37 37 35 35 30 21 16 14 13 13 13 10 8
20601110617 1 10 18 36 41 37 43 43 43 46 38 48 36 40 43 30 35 20 14 14 14 10 4
20601110618 2 14 36 51 54 60 57 57 58 58 58 58 58 52 56 44 33 28 26 24 21 14 6
20601110619 3 16 39 48 54 58 57 59 59 59 59 59 59 57 57 51 38 32 30 27 23 16 7
20601110620 8 25 43 66 68 84 77 82 77 86 78 85 77 85 75 77 57 56 41 40 35 24 12
20601110621 12 17 24 47 50 64 56 62 61 67 60 65 58 61 55 55 36 38 28 27 21 18 13
20601110622 11 15 24 41 47 60 52 61 61 63 56 58 54 54 49 42 29 28 23 23 18 16 13
20601110623 6 19 36 48 52 64 59 65 62 67 60 63 60 62 56 52 40 37 30 29 27 19 10
20601110624 12 18 25 48 51 66 58 65 63 69 62 66 60 62 57 56 38 39 29 28 22 18 14
20601110625 7 21 36 54 55 71 64 69 65 72 65 71 64 70 62 64 47 47 34 33 29 21 11
20601110626 3 22 50 55 61 74 66 76 76 79 69 69 68 70 65 46 41 35 32 32 32 21 8
20601110627 7 11 22 33 41 50 42 53 54 57 46 46 44 43 37 24 18 14 14 14 13 11 9
20601110628 3 24 52 56 62 74 70 75 74 78 70 72 70 72 66 56 48 40 35 35 35 23 9
20601110629 3 19 42 47 53 64 56 66 66 69 60 60 58 60 56 40 35 30 28 27 27 18 7
20601110630 3 24 54 60 64 79 70 80 79 81 74 74 73 75 71 54 48 41 38 38 37 25 10
20601110701 0 15 42 46 56 61 59 71 71 71 66 61 61 61 56 42 27 23 20 18 15 14 4
20601110702 0 10 31 34 40 46 45 53 53 53 50 45 45 45 42 36 20 18 17 13 10 10 3
20601110703 0 6 21 24 30 34 31 40 40 40 36 32 32 32 28 17 10 9 8 7 6 6 0
20601110704 0 12 32 33 41 44 43 51 51 51 48 45 45 45 41 34 20 18 16 14 12 12 1
20601110705 0 9 22 22 25 30 31 33 33 33 33 29 29 29 29 31 17 16 14 11 9 9 3
20601110706 0 9 21 20 23 26 28 30 30 30 31 27 27 27 26 28 16 14 13 11 9 9 1
20601110707 0 7 16 24 32 29 36 32 31 31 32 24 24 25 24 19 10 9 7 7 7 7 1
20601110708 0 16 33 37 49 45 53 51 49 49 50 42 42 43 42 37 22 19 17 16 16 16 3
20601110710 0 8 18 23 29 27 34 32 31 31 33 25 25 24 25 20 12 10 9 9 8 8 1
20601110712 0 1 3 24 30 27 26 30 30 30 31 26 20 29 29 15 19 13 1 1 1 1 0
20601110713 0 11 21 41 47 51 46 53 53 54 54 46 47 51 52 39 38 28 11 11 11 11 2
20601110714 0 13 27 37 49 42 49 46 45 45 46 39 40 41 41 33 22 18 13 13 13 13 2
20601110715 0 0 3 17 18 14 18 15 15 15 16 14 10 11 10 4 0 0 0 0 0 0 0
20601110716 0 0 1 28 27 35 28 39 35 35 30 27 32 25 24 24 24 16 0 0 0 0 0
20601110717 0 12 24 33 41 37 43 41 39 39 41 34 36 35 35 30 18 15 12 12 12 12 2
20601110718 0 0 0 18 19 24 18 24 24 24 24 18 23 18 18 17 17 11 0 0 0 0 0
20601110719 0 1 5 22 23 24 24 25 25 25 26 20 23 19 19 15 13 9 1 1 1 1 0
20601110720 1 18 24 35 38 41 40 41 42 44 41 44 41 44 39 43 34 31 20 16 16 10 3
20601110721 0 19 26 34 39 40 41 42 43 45 43 44 42 44 39 42 33 29 19 16 17 11 3
20601110722 0 0 1 8 12 11 10 11 12 11 12 13 12 11 11 11 12 11 5 0 0 0 0
20601110723 0 5 7 13 16 16 17 17 17 17 17 18 17 17 17 17 15 14 7 4 5 3 1
20601110724 0 20 36 39 48 49 49 57 58 58 54 51 51 51 45 36 28 22 18 18 19 14 3
20601110725 0 5 15 17 22 25 22 29 29 29 26 23 23 23 20 10 7 6 5 5 5 4 0
20601110726 0 17 41 44 56 60 57 71 71 71 65 59 59 59 53 35 25 20 18 17 16 14 3
20601110727 0 0 3 21 21 21 21 21 21 21 21 19 18 16 15 10 7 5 0 0 0 0 0
20601110728 0 13 24 41 48 52 48 54 53 54 54 46 52 48 49 43 37 27 13 13 13 13 2
20601110729 0 14 29 31 39 40 39 48 48 48 45 41 41 41 37 26 20 17 13 13 13 11 2
20601110730 0 15 40 42 53 57 53 68 68 68 62 56 56 56 50 32 22 19 16 15 15 14 1
20601110731 0 0 2 7 11 11 11 12 12 12 12 12 12 11 11 10 10 9 4 0 0 0 0
20601110732 0 7 16 24 30 25 33 30 29 28 31 24 23 23 23 17 9 8 7 7 7 7 1
20601110733 0 17 35 40 52 47 57 54 52 52 55 45 45 45 45 39 23 20 17 17 17 17 3
20601110734 0 0 3 14 16 12 18 14 14 14 16 11 9 9 9 3 0 0 0 0 0 0 0
20601110735 0 0 3 13 15 12 17 14 14 14 16 11 9 9 9 4 1 1 1 0 0 0 0
20601110736 0 15 30 33 43 39 48 47 46 45 48 38 38 38 38 34 20 18 15 15 15 15 2
20601110901 0 14 31 43 51 45 53 51 54 51 45 45 46 44 41 40 36 28 20 18 15 14 3
20601110902 0 10 21 23 28 24 30 27 31 28 26 24 26 24 23 25 21 16 13 13 11 10 2
20601110903 0 7 28 34 38 32 38 36 38 34 36 34 40 34 34 34 33 25 19 17 9 7 2
20601110904 0 8 14 20 28 28 37 30 37 31 19 17 17 17 15 17 13 10 8 8 8 8 1
20601110905 0 17 28 37 50 52 61 55 62 58 35 33 33 33 30 33 25 19 17 17 17 17 3
20601110906 0 12 20 37 41 47 41 47 49 49 48 42 46 43 43 38 36 26 12 12 12 12 2
20601110907 0 13 22 28 37 41 45 41 47 43 28 26 26 26 24 26 19 15 13 13 13 13 2
20601110908 0 2 4 17 18 23 20 23 24 23 21 16 20 16 16 16 15 11 2 2 2 2 0
20601110909 0 1 3 21 22 28 22 28 28 28 28 22 28 22 22 21 21 14 1 1 1 1 0
20601110910 0 0 0 16 16 22 16 22 22 22 21 16 21 15 16 15 16 10 0 0 0 0 0
20601110911 0 2 4 10 15 18 24 18 24 18 7 5 5 5 4 5 4 3 2 2 2 2 0
20601110912 0 0 12 11 14 11 14 11 14 10 12 10 15 10 12 11 15 10 8 6 2 0 0
20601110913 2 5 7 30 29 36 30 42 36 36 31 29 35 28 28 27 26 19 5 5 3 3 2
20601110914 1 1 2 20 20 26 20 28 26 26 23 20 26 19 20 19 19 13 1 1 1 1 1
20601110915 0 0 3 5 6 6 8 6 8 6 4 3 4 3 3 3 4 3 2 2 1 0 0

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18). The below figure maps this output for just the SA1 zones within the Melbourne CBD - North SA2 zone.

Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for Saturday 14th October 2023, by hour between 5am and 1amr

Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for Saturday 14th October 2023, by hour between 5am and 1amr

Victorian GTFS and SA1 zones within the Clayton (North) - Notting Hill SA2 zone, SI values for Saturday 14th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Clayton (North) - Notting Hill SA2 zone, SI values for Saturday 14th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Caulfield - North SA2 zone, SI values for Saturday 14th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Caulfield - North SA2 zone, SI values for Saturday 14th October 2023, by hour between 5am and 1am

Sunday 15th October, 2023

Victorian GTFS and SA1 zones within the Greater Melbourne GCCSA, hourly SI values for October 10, 2023, first 75 SA1 zones, 4am to 2am only

area_id 4:00 5:00 6:00 7:00 8:00 9:00 10:00 11:00 12:00 13:00 14:00 15:00 16:00 17:00 18:00 19:00 20:00 21:00 22:00 23:00 24:00 25:00 26:00
20601110601 0 10 27 45 51 51 43 39 38 43 38 47 51 51 51 32 23 18 8 5 3 0 0
20601110605 2 20 86 99 93 85 73 69 65 67 75 88 103 100 86 65 44 38 29 27 18 4 0
20601110606 1 19 69 84 84 73 68 62 60 61 67 75 90 85 70 56 35 29 19 18 12 2 0
20601110608 0 11 24 36 39 36 32 29 29 30 30 34 39 38 33 25 17 13 9 8 5 0 0
20601110609 2 26 64 90 90 89 74 69 66 69 72 82 97 97 85 68 50 41 29 25 16 3 0
20601110610 4 40 99 137 131 133 108 102 95 99 106 121 146 150 130 107 82 66 50 43 29 7 0
20601110611 1 21 47 71 77 78 64 60 57 61 60 70 79 80 75 56 41 33 20 16 10 1 0
20601110612 2 22 67 93 95 97 79 74 69 76 75 88 101 104 95 69 51 40 27 22 15 3 0
20601110613 2 19 61 79 76 76 63 60 53 61 61 71 81 84 77 51 37 29 24 22 15 4 0
20601110614 3 21 67 85 78 81 66 65 57 63 65 76 87 89 81 57 41 32 27 27 18 5 0
20601110615 0 2 16 25 26 26 22 20 18 24 18 25 26 26 28 10 5 4 2 1 1 0 0
20601110616 0 17 49 64 67 56 56 49 49 50 53 59 69 64 53 42 25 21 13 13 8 0 0
20601110617 2 15 58 70 62 68 56 56 52 55 56 65 67 68 64 42 33 21 14 14 10 4 0
20601110618 2 20 64 88 89 90 73 70 64 72 70 83 94 97 89 61 45 35 24 20 14 3 0
20601110619 2 24 64 91 93 94 77 72 68 73 73 85 99 101 92 70 52 42 28 23 15 3 0
20601110620 3 34 98 120 115 117 104 100 95 97 101 113 124 127 119 97 80 60 44 40 19 5 0
20601110621 0 31 68 91 94 93 87 84 84 84 84 88 95 94 92 76 60 44 30 27 9 0 0
20601110622 0 29 67 90 95 86 85 79 78 79 79 85 95 91 84 70 49 38 25 23 9 0 0
20601110623 2 26 77 96 93 91 80 76 73 74 79 88 99 99 91 73 55 43 32 29 16 3 0
20601110624 0 32 71 94 97 96 89 86 86 86 87 91 98 97 94 78 61 45 31 28 10 1 0
20601110625 2 29 80 101 97 99 87 84 80 81 85 95 103 105 100 81 66 50 37 33 16 4 0
20601110626 3 26 99 118 108 99 86 81 76 80 87 102 120 119 100 78 53 45 35 32 21 5 0
20601110627 0 20 63 80 84 69 72 62 63 62 66 74 87 80 65 53 31 26 14 14 8 0 0
20601110628 3 27 96 114 108 103 86 82 76 79 87 103 118 119 104 79 58 47 38 35 23 6 0
20601110629 2 23 84 102 96 86 77 71 67 71 76 88 106 103 87 68 46 39 30 27 18 4 0
20601110630 3 30 99 123 112 107 91 86 79 84 91 105 126 127 108 85 59 50 41 37 25 6 0
20601110701 0 27 91 107 117 89 84 76 76 76 82 93 110 111 104 71 61 37 18 17 13 0 0
20601110702 0 19 64 75 85 70 66 58 59 59 62 67 80 83 76 54 47 30 14 12 9 0 0
20601110703 0 13 53 60 61 48 45 41 41 41 45 54 61 59 54 34 31 16 8 8 5 0 0
20601110704 0 19 67 76 82 66 62 54 55 55 59 68 78 81 75 52 45 27 16 14 10 0 0
20601110705 0 14 36 42 51 47 44 37 38 38 38 37 45 52 50 37 31 23 12 10 8 0 0
20601110706 0 13 35 41 45 42 39 32 34 34 33 37 41 48 46 33 27 20 13 10 8 0 0
20601110707 0 9 32 42 44 43 38 32 39 32 34 37 40 44 47 23 14 11 7 7 7 0 0
20601110708 0 22 56 70 70 66 58 49 57 50 53 59 64 73 78 45 30 24 17 16 16 0 0
20601110710 0 11 33 41 41 42 37 32 36 32 32 38 38 43 44 26 16 13 9 8 8 0 0
20601110712 0 2 36 56 45 45 43 41 44 41 43 44 50 44 47 21 19 7 1 1 1 0 0
20601110713 0 16 67 93 82 78 72 69 69 69 71 73 84 78 91 49 42 22 13 11 11 0 0
20601110714 0 18 54 71 69 62 55 49 55 49 53 60 65 69 76 40 28 19 14 13 13 0 0
20601110715 0 0 14 21 21 22 19 18 19 15 17 22 21 21 21 8 0 0 0 0 0 0 0
20601110716 0 2 42 61 53 61 51 51 51 51 51 52 52 53 51 34 24 8 0 0 0 0 0
20601110717 0 17 46 59 59 54 48 43 47 42 45 52 55 59 64 36 24 17 13 12 12 0 0
20601110718 0 0 29 41 36 41 35 35 35 35 35 36 36 35 36 23 16 6 0 0 0 0 0
20601110719 0 2 29 40 37 41 35 34 35 32 34 37 38 36 38 21 14 5 2 1 1 0 0
20601110720 1 24 49 65 59 55 48 47 46 47 48 51 56 64 72 48 44 33 18 17 13 0 0
20601110721 0 25 51 69 64 55 49 47 47 47 50 54 58 68 75 49 42 32 18 18 14 0 0
20601110722 0 1 15 18 14 17 14 18 14 17 14 17 18 19 19 14 14 12 3 0 0 0 0
20601110723 0 7 20 26 24 22 21 21 20 21 21 22 23 26 28 21 19 15 5 5 4 0 0
20601110724 0 29 72 92 91 67 62 58 58 58 65 74 82 89 88 56 46 31 18 21 15 0 0
20601110725 0 10 39 44 44 34 32 30 30 30 33 40 44 42 39 23 22 11 5 6 4 0 0
20601110726 0 28 92 109 113 83 79 73 73 73 80 92 108 106 100 65 55 33 17 19 13 0 0
20601110727 0 0 23 34 31 34 29 29 29 26 28 31 31 31 31 16 7 2 0 0 0 0 0
20601110728 0 19 67 89 82 79 71 66 68 66 69 73 82 78 91 52 42 24 15 13 13 0 0
20601110729 0 21 61 75 75 56 53 49 49 49 53 62 70 72 71 45 37 24 13 15 11 0 0
20601110730 0 26 89 103 104 81 76 68 69 69 75 89 101 100 95 60 52 30 16 17 12 0 0
20601110731 0 1 15 18 16 16 14 17 14 17 15 17 18 18 18 14 13 10 2 0 0 0 0
20601110732 0 9 31 39 39 38 34 30 34 29 30 37 37 40 42 22 12 10 7 7 7 0 0
20601110733 0 24 59 75 74 69 61 53 60 53 56 64 67 77 82 48 31 25 18 17 17 0 0
20601110734 0 0 12 17 17 20 17 16 18 14 15 20 17 17 17 6 0 0 0 0 0 0 0
20601110735 0 0 12 17 18 20 17 16 18 14 15 20 18 18 18 7 1 1 1 0 0 0 0
20601110736 0 20 51 63 62 61 54 45 52 47 48 55 57 66 69 42 28 23 16 15 14 0 0
20601110901 0 27 65 88 88 79 74 72 70 70 74 77 79 91 93 63 50 34 25 19 15 0 0
20601110902 0 19 37 50 50 43 41 39 38 38 40 42 44 52 54 35 28 19 15 13 11 0 0
20601110903 0 27 59 65 66 62 55 55 53 53 56 59 63 67 73 56 52 31 22 19 10 0 0
20601110904 0 12 25 60 60 54 55 52 52 52 53 52 50 63 59 25 15 11 10 8 8 0 0
20601110905 0 24 51 105 103 92 92 87 87 87 90 86 86 108 103 47 30 22 19 17 17 0 0
20601110906 0 18 61 82 74 73 67 63 63 63 65 66 75 73 85 48 40 22 14 12 12 0 0
20601110907 0 19 38 79 78 69 69 65 65 65 67 65 65 82 79 35 24 17 15 13 13 0 0
20601110908 0 4 26 41 37 40 36 35 35 35 35 35 36 37 38 22 16 7 3 2 2 0 0
20601110909 0 2 35 49 42 48 42 41 41 41 41 41 44 40 44 28 22 8 2 1 1 0 0
20601110910 0 0 27 39 33 38 33 33 33 33 33 33 33 33 33 21 15 5 0 0 0 0 0
20601110911 0 4 9 40 40 38 38 38 38 38 38 36 33 41 36 11 4 3 3 2 2 0 0
20601110912 0 13 26 27 28 29 24 25 24 24 25 28 27 27 30 23 25 14 10 8 2 0 0
20601110913 1 8 48 68 64 67 51 51 51 50 49 54 57 60 57 38 26 10 6 5 2 0 0
20601110914 0 2 33 46 41 46 38 38 38 38 38 39 39 40 40 26 19 7 1 1 1 0 0
20601110915 0 4 7 15 15 15 13 14 13 13 14 13 13 14 14 7 6 3 3 3 1 0 0

This appears to meet expectations, with SI scores peaking in the morning (8-9) and evening (17-18). The below figure maps this output for just the SA1 zones within the Melbourne CBD - North SA2 zone.

Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for Sunday 15th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Melbourne CBD - North SA2 zone,SI values for Sunday 15th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the MClayton (North) - Notting Hill SA2 zone,SI values for Sunday 15th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the MClayton (North) - Notting Hill SA2 zone,SI values for Sunday 15th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Caulfield - North SA2 zone, SI values for Sunday 15th October 2023, by hour between 5am and 1am

Victorian GTFS and SA1 zones within the Caulfield - North SA2 zone, SI values for Sunday 15th October 2023, by hour between 5am and 1am

Discussion and conclusions

References